package cn.xuguowen.user.designPatten.factory.hsp_abstract_factory;

import cn.xuguowen.user.designPatten.factory.pizza.Pizza;

/**
 * ClassName: LDPizzaFactory
 * Package: cn.xuguowen.user.designPatten.factory.hsp_abstract_factory
 * Description:
 * 伦敦披萨工厂
 * @Author 徐国文
 * @Create 2023/4/26 15:21
 * @Version 1.0
 */
public class LDPizzaFactory implements PizzaFactory{
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheese".equals(orderType)) {
            pizza = new LDCheesePizza();
            pizza.setName("伦敦奶酪披萨");
        } else if ("greek".equals(orderType)) {
            pizza = new LDGreekPizza();
            pizza.setName("伦敦希腊披萨");
        }
        return pizza;
    }
}
